package pojo;

/**
 * @author LiangHaiBo
 * @version 1.0
 * @date 2021.9.9 下午 23:49
 */
public class OrderItem {

    /**`itemid` varchar(32) NOT NULL,
        `count` int DEFAULT NULL,
        `subtotal` double DEFAULT NULL,
        `pid` varchar(32) DEFAULT NULL,
        `oid` varchar(32) DEFAULT NULL,*/

    private  String itemid;//订单项id号
    private  int count;//订单项包含的商品数量
    private Double subtotal;//订单项小计金额
    private Product product;//(pid:那个商品)
    private Order order;//(oid:属于那个订单的订单项)

    public String getItemid() {
        return itemid;
    }

    public void setItemid(String itemid) {
        this.itemid = itemid;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Double getSubtotal() {
        return subtotal;
    }

    public void setSubtotal(Double subtotal) {
        this.subtotal = subtotal;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "itemid='" + itemid + '\'' +
                ", count=" + count +
                ", subtotal='" + subtotal + '\'' +
                ", product=" + product +
                ", order=" + order +
                '}';
    }
}
